package com.weixin.shop.admin.model.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 首页消息
 * </p>
 *
 * @author hongwang
 * @since 2018-03-12
 */
@TableName("sys_news")
public class SysNews extends Model<SysNews> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 显示标题
     */
	private String title;
    /**
     * 0：上线，1：下线
     */
	private Integer status;
    /**
     * 权重：数字越大排序权重越高
     */
	private Integer weight;
    /**
     * 创建人
     */
	private String operator;
    /**
     * 有效开始时间
     */
	@TableField("valid_starttime")
	private Date validStarttime;
    /**
     * 有效结束时间
     */
	@TableField("valid_endtime")
	private Date validEndtime;
	/**
	 * 创建时间
	 */
	@TableField("create_time")
	private Date createTime;
	/**
	 * 更新时间
	 */
	@TableField("update_time")
	private Date updateTime;
    /**
     * 城市id
     */
	@TableField("city_code")
	private String cityCode;


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getWeight() {
		return weight;
	}

	public void setWeight(Integer weight) {
		this.weight = weight;
	}

	public String getOperator() {
		return operator;
	}

	public void setOperator(String operator) {
		this.operator = operator;
	}

	public Date getValidStarttime() {
		return validStarttime;
	}

	public void setValidStarttime(Date validStarttime) {
		this.validStarttime = validStarttime;
	}

	public Date getValidEndtime() {
		return validEndtime;
	}

	public void setValidEndtime(Date validEndtime) {
		this.validEndtime = validEndtime;
	}





	public String getCityCode() {
		return cityCode;
	}

	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "SysNews{" +
			", id=" + id +
			", title=" + title +
			", status=" + status +
			", weight=" + weight +
			", operator=" + operator +
			", validStarttime=" + validStarttime +
			", validEndtime=" + validEndtime +
			", cityCode=" + cityCode +
			"}";
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
}
